<template>
	<view class="rental_people">
		<view class="rp_content" v-for="(item,index) in data " :key="index">
			<view class="one">
				<tm-avatar src='/static/tabbar/mySelected.png'></tm-avatar>
			</view>
			<view class="two">
				<view class="">
					姓名：{{item.UCR02}}
				</view>
				<view class="">
					联系电话：{{item.UCR03}}
				</view>
				<view class="">
					驾照领取时间：{{item.UCR06}}
				</view>
			</view>
		</view>
		
		<view class="rp_bottom">
			<tm-button  theme="bg-gradient-orange-accent" :round="24" block @click='addPeople'>新增常用租车人</tm-button>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad() {
			this.searchPeoples()
		},
		data() {
			return {
				data:''
			}
		},
		methods: {
			addPeople(){
				uni.navigateTo({
					url:'/pages/addpeoples/addpeoples'
				})
			},
			async searchPeoples(){
				const Rres = await this.$wxRequest({
					url: '/wx/search_peoples',
					method: 'POST',
				});
				this.data = Rres.data.data
				console.log(this.data)
			}
		}
	}
</script>

<style lang="scss" scoped>
.rental_people{
	width: 100%;
	height: 100%;
	.rp_content{
		display: flex;
		background-color: #ffffff;
		padding: 20rpx;
		border-radius: 30rpx;
		align-items: center;
		justify-content: space-evenly;
		margin-bottom: 40rpx;
		.one{
			width: 20%;
		}
		.two{
			width: 80%;
		}
	}
	.rp_bottom{
		position: fixed;
		bottom: 0;
		min-width: 100%;
		background-color: #ffffff;
		
	}
}
</style>
